package org.kgc.alanhealth.entity;

import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName hospital_shoppingcart
 */
@Data
public class HospitalShoppingcart implements Serializable {
    /**
     * 购物车id
     */
    private Integer id;

    /**
     * 用户id
     */
    private Integer userid;

    /**
     * 数量
     */
    private Integer drugnumber;

    /**
     * 药品名称
     */
    private String drugname;

    /**
     * 药品价格
     */
    private String drugprice;

    /**
     * 图片路径
     */
    private String pictrue;

    /**
     * 药品id
     */
    private Integer drugid;

    /**
     * 
     */
    private Integer status;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        HospitalShoppingcart other = (HospitalShoppingcart) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserid() == null ? other.getUserid() == null : this.getUserid().equals(other.getUserid()))
            && (this.getDrugnumber() == null ? other.getDrugnumber() == null : this.getDrugnumber().equals(other.getDrugnumber()))
            && (this.getDrugname() == null ? other.getDrugname() == null : this.getDrugname().equals(other.getDrugname()))
            && (this.getDrugprice() == null ? other.getDrugprice() == null : this.getDrugprice().equals(other.getDrugprice()))
            && (this.getPictrue() == null ? other.getPictrue() == null : this.getPictrue().equals(other.getPictrue()))
            && (this.getDrugid() == null ? other.getDrugid() == null : this.getDrugid().equals(other.getDrugid()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserid() == null) ? 0 : getUserid().hashCode());
        result = prime * result + ((getDrugnumber() == null) ? 0 : getDrugnumber().hashCode());
        result = prime * result + ((getDrugname() == null) ? 0 : getDrugname().hashCode());
        result = prime * result + ((getDrugprice() == null) ? 0 : getDrugprice().hashCode());
        result = prime * result + ((getPictrue() == null) ? 0 : getPictrue().hashCode());
        result = prime * result + ((getDrugid() == null) ? 0 : getDrugid().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userid=").append(userid);
        sb.append(", drugnumber=").append(drugnumber);
        sb.append(", drugname=").append(drugname);
        sb.append(", drugprice=").append(drugprice);
        sb.append(", pictrue=").append(pictrue);
        sb.append(", drugid=").append(drugid);
        sb.append(", status=").append(status);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}